package com.zxq.ai.application.gateway;

import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 外卖开放平台Gateway
 */
@Service
@Slf4j
public class MTWaimaiGateway {

    /**
     * 分页查询 订单ID
     * 文档：<a href="https://developer.meituan.com/docs/api/wmoper-ng-order-queryOrders">...</a>
     */
    public List<Long> pageQueryOrderIdList() {

        // MeituanClient meituanClient = DefaultMeituanClient.builder(10000L, "xxxxx").build();
        //
        // WmoperngOrderListRequest wmoperngOrderListRequest = new WmoperngOrderListRequest();
        //
        // wmoperngOrderListRequest.setDayInt(20210501);
        // wmoperngOrderListRequest.setOrderStatus(-1);
        // wmoperngOrderListRequest.setPageNo(1);
        // wmoperngOrderListRequest.setPageSize(10);
        //
        // String appAuthToken = "xxxx";
        // MeituanResponse<WmoperngOrderListResponse> response = meituanClient.invokeApi(request, appAuthToken);
        //
        // if (response.isSuccess()) {
        //     WmoperngOrderListResponse resp = response.getData();
        //     log.info(resp);
        // } else {
        //     System.out.println("调用失败");
        // }

        log.info("queryOrdersByPage");

        return Lists.newArrayList();
    }

    /**
     * 根据 orderId 查询订单详情
     * @param orderId
     */
    public void queryOrderDetail(Long orderId) {

    }

}
